package cn.edu.scau.cmi.yangzhichao.singleton;

import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;


public class ChairMan {
    private static ChairMan ChairMan;
    private StringProperty name;
    private ChairMan(){
        this.name=new SimpleStringProperty();
    }

    private ChairMan(String name){
        this.name=new SimpleStringProperty(name);
    }

    public String getName() {
        return name.get();
    }

    public StringProperty nameProperty() {
        return name;
    }

    public void setName(String name) {
        this.name.set(name);
    }

    public static ChairMan getInstance(String name){
        if(ChairMan==null){
            ChairMan=new ChairMan(name);
        }
        return ChairMan;
    }


}
